Ext.define('AM.view.window.AddRow', {
    extend: 'Ext.window.Window',
    alias : 'widget.addrow',
    stores: ['StoreComboSubpro', 'StoreComboCild'],
    title : 'Add New Row',
    layout: 'fit',
    autoShow: true,
    modal : true,
        
    initComponent: function() {
        this.items = [
            {
                xtype: 'form',
                bodyPadding: '5px,5px,5px,5px',
                layout: 'anchor',
                width: 400,
                defaults: {
                    anchor: '100%'
                },
                items: [{
                        xtype: 'textfield',
                        name : 'denum',
                        fieldLabel: 'Denumire'
                    },{
                    	xtype:'subpro',
                    	name : 'idsubpro',
                    	id:'subpro'
                    },{
                    	xtype:'cild',
                    	name : 'idcild',
                    	id:'cild'
                    },{
                    	xtype: 'datefield',
                        //anchor: '100%',
                    	id:'data',
                        fieldLabel: 'Data',
                        name: 'data',
                        value: new Date(),
                        format:'d.m.Y'
                    },{
                        xtype: 'textfield',
                        name : 'suma',
                        fieldLabel: 'Suma'
                    }
                ]
            }
        ];

        this.buttons = [
            {
                text: 'Save',
                id: 'save',
                action: 'save',
                iconCls: "btn-save",
                icon: 'images/save.gif',
                //hidden : false
            },{
                text: 'Update',
                id: 'update',
                action: 'update',
                //hidden : false
            },{
                text: 'Cancel',
                scope: this,
                handler: this.close
            }
        ];

        this.callParent(arguments);
    }
});